<?php
if($this->uri->segment(3) == "location"){

?>
<script type="text/javascript" src="<?php echo base_url()?>js/jquery-1.4.2.js"></script>
<script type="text/javascript">       
	$(document).ready(function(){
			var map = new GMap2(document.getElementById('map'));
			var southAfrica = new GLatLng(-30.559482, 22.937506);
			map.setCenter(southAfrica, 5);
			map.disableDoubleClickZoom();
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());
			$('#network_info').change(function(){
            location.href = $('#network_info').val();
			});	
    });
</script>

<?php }?>

<div class="page noright adminpage adminuser">
    <!--Users List-->
    <h3 class="purple">Users(<?php echo $total_user?>)</h3>
    <hr /> 
	
<div id="user-nav" class="clearfix">
	<form action="#" id="user-sorting">
	<p>Show :
	<?php
		$prov_array = array('all'=>'All Provinces','johannesburg'=>'Johannesburg',);
		$extra_prov = 'id="province"';
		echo form_dropdown('province',$prov_array,'',$extra_prov);
	?></p>
	<p>Sorting :
	<?php
		$sort_array = array('asc'=>'Ascending','dsc'=>'Descending',);
		$extra_sort = 'id="sorting"';
		echo form_dropdown('sorting',$sort_array,'',$extra_sort);
	?></p>
	<p>
	<?php
		
		$id_sort = 'id="go_list"';
		echo form_button('go_list','Go',$id_sort);
	?></p>
	</form>
	<form action="#" id="user-search">
	<p><?php
		$username_element = array(
		'name'  => 'username',
		'id'    => 'search',
		'value' => 'Search...');
        echo form_input($username_element);
	?></p>
	<p><?php
		$form_button = array(
		'type'=>'submit',
		'name'=>'submit',
		'value'=>'submit',
		'content'=>'GO',
		'class'=>'no',);
        echo form_button($form_button);
		?></p>
	</form>
</div>
	<h2><?php echo $info['firstname'] ?></h2>
	<p>Create on <?php echo $info['created_date']; ?></p>
	<p>Last modified <?php echo $info['last_login']; ?></p>
<hr class="nobottom"/>
<div class="tabs">
<ul>
	<li><? echo ($this->uri->segment(3) == 'profile') ? '<a class="selected"' : '<a href='.site_url('admin/users/profile/'.$this->uri->segment(4)).'';?>>Login</a></li>
	<li><? echo ($this->uri->segment(3) == 'info') ? '<a class="selected"' : '<a href='.site_url('admin/users/info/'.$this->uri->segment(4)).'';?>>Your Info</a></li>
	<li><? echo ($this->uri->segment(3) == 'location') ? '<a class="selected"' : '<a href='.site_url('admin/users/location/'.$this->uri->segment(4)).'';?>>Location</a></li>
	<li><? echo ($this->uri->segment(3) == 'homeinfo') ? '<a class="selected"' : '<a href='.site_url('admin/users/homeinfo/'.$this->uri->segment(4)).'';?>>Home Info</a></li>
	<li><? echo ($this->uri->segment(3) == 'politicalbias') ? '<a class="selected"' : '<a href='.site_url('admin/users/politicalbias/'.$this->uri->segment(4)).'';?>>Political Bias</a></li>
	<li><? echo ($this->uri->segment(3) == 'networks') ? '<a class="selected"' : '<a href='.site_url('admin/users/networks/'.$this->uri->segment(4)).'';?>>Network/s</a></li>
	<li><? echo ($this->uri->segment(3) == 'settings') ? '<a class="selected"' : '<a href='.site_url('admin/users/settings/'.$this->uri->segment(4)).'';?>>Settings</a></li>
	<li><? echo ($this->uri->segment(3) == 'content') ? '<a class="selected"' : '<a href='.site_url('admin/users/content/'.$this->uri->segment(4)).'';?>>Content</a></li>
	<li><? echo ($this->uri->segment(3) == 'delete') ? '<a class="selected"' : '<a href='.site_url('admin/users/delete/'.$this->uri->segment(4)).'';?>>Delete</a></li>
</ul>
</div>